/*==============================================================================
             Copyright (c) 2009 - All rights reserved
================================================================================
File description:

    Select function definition

================================================================================
      Date            Name                    Description of Change
28-Aug-2009  Xiaofeng.Gu                    Written
$HISTORY$
==============================================================================*/
#include "stdafx.h"
#include "ISelect.h"
#include <algorithm>

CSelectSet::CSelectSet()
{
}

CSelectSet::~CSelectSet()
{
	Clear();
}

void CSelectSet::AddSelect(ISelect* pObj)
{
	SelectSet::iterator it;
	it = std::find(m_SelectSet.begin(), m_SelectSet.end(), pObj);
	if (it == m_SelectSet.end())
	{
		m_SelectSet.push_back(pObj);
	}
}

void CSelectSet::Clear()
{
	m_SelectSet.clear();
}

long CSelectSet::GetCount()
{
	return (long)(m_SelectSet.size());
}

ISelect* CSelectSet::GetObject(long lAt)
{
	return m_SelectSet[lAt];
}